package projectATM;


public class ATMFunctions {
	private int balance = 5000;
	public ATMFunctions(){
	
	}
	
	public void addFunds(int amount){
		balance += amount;
		ATMGui.updateDisplay("Thank you, you deposited: " + amount);
		
	}
	
	public void withdrawFunds(int amount){
		if (amount > balance){
			ATMGui.updateDisplay("You don't have enough money!");
		}
		else{
		balance -= amount;
		ATMGui.updateDisplay("Thank you, you withdrew: " + amount);
		}
	}

	public void printBalance() {
		ATMGui.updateDisplay("Your balance is: " + balance);
	}

}
